package org.zappee.dannyt.cairngorm.command
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import org.zappee.dannyt.cairngorm.business.Bug;
	import org.zappee.dannyt.cairngorm.event.EditBugEvent;
	import org.zappee.dannyt.cairngorm.model.ModelLocator;
	
	public class EditBugCommand implements ICommand
	{
		public function EditBugCommand()
		{
		}
		
		public function execute(event:CairngormEvent):void
		{
			var model:ModelLocator = ModelLocator.getInstance();
			var bug:Bug = EditBugEvent(event).bug;
			model.manageBug = bug;
			model.viewState = ModelLocator.VIEWING_MANAGE_BUG_SCREEN;
		}
	}
}